﻿using System;
using System.Web.UI;



namespace mojoPortal.Web.RS.CRM
{
    public partial class RSViewClientByAgent : RSBasePage
    {
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                //ucClientByAgentListControl.LoadClientByAgentListData();

                InitializeReadyServicePage("Clients By Agent");
                RSUserIdentity userIdentity = GetRSUserIdentity();
                if (Request.QueryString["employeeid"] != null)
                {
                    Session["SELECTED_AGENTID_IS_MY_DOWNLINE_LEAD"] = Convert.ToInt32(Request.QueryString["employeeid"].ToString());
                    int agentid = Convert.ToInt32(Request.QueryString["employeeid"].ToString());
                    ucAgentHeaderControl.LoadAgentData(userIdentity.RSCompanyId, agentid);
                    ucClientByAgentListControl.LoadClientByAgentListData();
                }
                else
                {
                    Session["SELECTED_AGENTID_IS_MY_DOWNLINE_LEAD"] = null;
                }
            }
        }

    }

}
